<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCarrierWechatsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('carrier_wechats', function (Blueprint $table) {
            $table->id();
            $table->foreignId('carrier_id')->constrained();
            $table->tinyInteger('wechat_type')->unsigned()->comment('公众号类型1=订阅号，2=认证订阅号，3=服务号，4=认证服务号');
            $table->string('appid',100)->comment('公众号appid');
            $table->string('secret',100)->comment('公众号appsecret');
            $table->string('logo',255)->nullable()->comment('公众号logo');
            $table->string('qrcode',255)->nullable()->comment('公众号二维码');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('carrier_wechats');
    }
}
